package com.xiang.sql.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.xiang.api.common.GoodsBannerHandler;
import com.xiang.api.entity.Banner;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 商品 数据实体
 * 
 * @author mac-xiang
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName(value = "`goods`", autoResultMap = true)
@ApiModel(value = "商品 对象", description = "商品")
public class Goods implements Serializable {

  private static final long serialVersionUID = 1L;
  /** id */
  @TableId(value = "id", type = IdType.ASSIGN_ID)
  public String id;

  /** 创建时间 */
  @TableField(value = "`create_time`", fill = FieldFill.INSERT)
  public Long createTime;

  /** 创建用户 */
  @TableField(value = "`user`", fill = FieldFill.INSERT)
  public String user;

  /** 名称 */
  @TableField(value = "`name`", fill = FieldFill.INSERT)
  public String name;

  /** 类型 */
  @TableField(value = "`type`", fill = FieldFill.INSERT)
  public String type;

  /** 价格(单位:分) */
  @TableField(value = "`money`", fill = FieldFill.INSERT)
  public Integer money;

  /** 横幅 */
  @TableField(value = "`banner`", typeHandler = GoodsBannerHandler.class)
  public List<Banner> banner;

  /** 说明 */
  @TableField(value = "`des`", fill = FieldFill.INSERT)
  public String des;
  /** 已售 */
  @TableField(value = "`sold`", fill = FieldFill.INSERT)
  public String sold;
  /** 标签1 */
  @TableField(value = "`tag_one`", fill = FieldFill.INSERT)
  public String tagOne;
  /** 标签2 */
  @TableField(value = "`tag_tow`", fill = FieldFill.INSERT)
  public String tagTow;

  public Goods() {
  }
}